<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="/WEB-INF/maa.tld" prefix="m" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<fmt:setLocale value="${language}"/>
<fmt:bundle basename="messages" prefix="mentorupdate.">

    <html>

    <head>
        <title><fmt:message key="title"/></title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <meta name="viewport" content="width=device-width">
        <link rel="stylesheet" href="${pageContext.servletContext.contextPath}/static/bootstrap/css/bootstrap.css">
        <link href="${pageContext.request.contextPath}/css/mentor-update.css" rel="stylesheet">
        <link rel="shortcut icon" href="${pageContext.servletContext.contextPath}/static/yin.ico">
        <script type="text/javascript"
                src="${pageContext.servletContext.contextPath}/static/bootstrap/js/bootstrap.min.js"></script>
        <style type="text/css">

        </style>

    </head>


    <div class="navbar-wrapper">
        <div class="container-fluid">
            <div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
                <div class="container">
                    <div class="navbar-header">
                        <button type="button" class="navbar-toggle" data-toggle="collapse"
                                data-target=".navbar-collapse">
                            <span class="sr-only">Toggle navigation</span>
                            <span class="icon-bar"></span>
                            <span class="icon-bar"></span>
                            <span class="icon-bar"></span>
                        </button>
                        <a class="navbar-brand" href="/maa/do?action=main"> <img
                                src="${pageContext.servletContext.contextPath}/static/ics.png"/>Silver Dragon</a>
                    </div>
                    <div class="navbar-collapse collapse">
                        <ul class="nav navbar-nav navbar-right">
                            <li><a><strong><fmt:message key="greet"/> ${user.name} ${user.surname}!</strong></a></li>
                            <m:language/>
                            <li>
                                <form action="/maa/do" method="post">
                                    <input type="hidden" name="action" value="logout">
                                    <input class="btn btn-default navig" type="submit"
                                           value="<fmt:message key="logout"/>"/>
                                </form>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="container-fluid">
        <div class="row">
            <div class="col-sm-3 col-md-2 sidebar">
                <ul class="nav nav-sidebar">
                    <li><h4><fmt:message key="overview"/></h4></li>
                    <li><a href="/maa/do?action=view-courses"><fmt:message key="courses"/></a></li>
                    <li><a href="/maa/do?action=view-users"><fmt:message key="clients"/></a></li>
                    <li><a href="/maa/do?action=view-mentors"><fmt:message key="mentors"/></a></li>
                </ul>
                <ul class="nav nav-sidebar">
                    <li><h4><fmt:message key="create"/></h4></li>
                    <li><a href="/maa/do?action=course-creation"><fmt:message key="newc"/></a></li>
                    <li><a href="/maa/do?action=user-creation"><fmt:message key="newu"/></a></li>
                </ul>
            </div>
            <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
                <h1 class="page-header"><fmt:message key="title"/></h1>

                <div class="container">
                    <form class="form-signin" action="/maa/do" method="post">
                        <h2 class="form-signin-heading"><fmt:message key="edit"/></h2>

                        <c:if test="${not empty incorrect_email}">
                            <%=request.getAttribute("incorrect_email")%>
                        </c:if>
                        <c:if test="${not empty incorrect_name}">
                            <%=request.getAttribute("incorrect_name")%>
                        </c:if>
                        <c:if test="${not empty incorrect_surname}">
                            <%=request.getAttribute("incorrect_surname")%>
                        </c:if>
                        <c:if test="${not empty incorrect_gender}">
                            <%=request.getAttribute("incorrect_gender")%>
                        </c:if>
                        <c:if test="${not empty incorrect_birthdate}">
                            <%=request.getAttribute("incorrect_birthdate")%>
                        </c:if>
                        <c:if test="${not empty incorrect_password}">
                            <%=request.getAttribute("incorrect_password")%>
                        </c:if>
                        <c:if test="${not empty incorrect_rang}">
                            <%=request.getAttribute("incorrect_rang")%>
                        </c:if>
                        <c:if test="${not empty incorrect_info}">
                            <%=request.getAttribute("incorrect_info")%>
                        </c:if>
                        <c:if test="${not empty incorrect_experience}">
                            <%=request.getAttribute("incorrect_experience")%>
                        </c:if>

                        <p><fmt:message key="email"/></p>
                        <input type="text" name="email" class="form-control input-lg" data-title="Luka"
                               placeholder="<fmt:message key="emailph"/>" value="${mentor.email}">

                        <p><fmt:message key="name"/></p>
                        <input type="text" name="name" class="form-control" placeholder="<fmt:message key="nameph"/>"
                               value="${mentor.name}">

                        <p><fmt:message key="surname"/></p>
                        <input type="text" name="surname" class="form-control"
                               placeholder="<fmt:message key="surnameph"/>"
                               value="${mentor.surname}">

                        <p><fmt:message key="gender"/></p>
                        <c:choose>
                            <c:when test="${mentor.gender eq 'MALE'}">
                                <select id="gender" name="gender" class="form-control">
                                    <option value="male" selected><fmt:message key="male"/></option>
                                    <option value="female"><fmt:message key="female"/></option>
                                </select>
                            </c:when>
                            <c:otherwise>
                                <select id="gender" name="gender" class="form-control">
                                    <option value="male"><fmt:message key="male"/></option>
                                    <option value="female" selected><fmt:message key="female"/></option>
                                </select>
                            </c:otherwise>
                        </c:choose>

                        <p><fmt:message key="birthdate"/></p>
                        <input type="date" name="birthdate" class="form-control" placeholder="Birthdate"
                               value="${mentor.birthdate}">

                        <p><fmt:message key="info"/></p>
                        <textarea name="info" class="form-controll" rows="15" cols="10">${mentor.info} </textarea>

                        <p><fmt:message key="rang"/></p>
                        <input type="text" name="rang" class="form-control" value="${mentor.rang}"/>

                        <p><fmt:message key="workexp"/></p>
                        <input type="double" name="experience" class="form-control" value="${mentor.workExperience}"/>

                        <p><fmt:message key="password"/></p>
                        <input type="password" name="password" class="form-control">

                        <p><fmt:message key="repeatpas"/></p>
                        <input type="password" name="reppassword" class="form-control">
                        <button class="btn btn-lg btn-block" type="submit"><fmt:message key="update"/></button>
                        <input type="hidden" name="curpas" value="${mentor.password}">
                        <input type="hidden" name="action" value="mentor-update">
                        <input type="hidden" name="uuid" value=${mentor.uuid}/>
                    </form>
                    <form class="form-signin" action="/maa/do" method="get">
                        <button class="btn btn-lg btn-block" type="submit"><fmt:message key="return"/></button>
                        <input type="hidden" name="action" value="admin-cabinet">
                    </form>
                </div>
            </div>
        </div>
    </div>
    </body>
    </html>
</fmt:bundle>
<%--<div class="container">--%>
<%--<form class="form-signin" action="/maa/do" method="post">--%>
<%--<h2 class="form-signin-heading"><fmt:message key="edit"/></h2>--%>

<%--<c:if test="${not empty incorrect_email}">--%>
<%--<%=request.getAttribute("incorrect_email")%>--%>
<%--</c:if>--%>
<%--<c:if test="${not empty incorrect_name}">--%>
<%--<%=request.getAttribute("incorrect_name")%>--%>
<%--</c:if>--%>
<%--<c:if test="${not empty incorrect_surname}">--%>
<%--<%=request.getAttribute("incorrect_surname")%>--%>
<%--</c:if>--%>
<%--<c:if test="${not empty incorrect_gender}">--%>
<%--<%=request.getAttribute("incorrect_gender")%>--%>
<%--</c:if>--%>
<%--<c:if test="${not empty incorrect_birthdate}">--%>
<%--<%=request.getAttribute("incorrect_birthdate")%>--%>
<%--</c:if>--%>
<%--<c:if test="${not empty incorrect_password}">--%>
<%--<%=request.getAttribute("incorrect_password")%>--%>
<%--</c:if>--%>
<%--<c:if test="${not empty incorrect_rang}">--%>
<%--<%=request.getAttribute("incorrect_rang")%>--%>
<%--</c:if>--%>
<%--<c:if test="${not empty incorrect_info}">--%>
<%--<%=request.getAttribute("incorrect_info")%>--%>
<%--</c:if>--%>
<%--<c:if test="${not empty incorrect_experience}">--%>
<%--<%=request.getAttribute("incorrect_experience")%>--%>
<%--</c:if>--%>

<%--<p><fmt:message key="email"/></p>--%>
<%--<input type="text" name="email" class="form-control input-lg" data-title="Luka"--%>
<%--placeholder="<fmt:message key="emailph"/>" value="${mentor.email}">--%>

<%--<p><fmt:message key="name"/></p>--%>
<%--<input type="text" name="name" class="form-control" placeholder="<fmt:message key="nameph"/>"--%>
<%--value="${mentor.name}">--%>

<%--<p><fmt:message key="surname"/></p>--%>
<%--<input type="text" name="surname" class="form-control" placeholder="<fmt:message key="surnameph"/>"--%>
<%--value="${mentor.surname}">--%>

<%--<p><fmt:message key="gender"/></p>--%>
<%--<select id="gender" name="gender" class="form-control">--%>
<%--<option value="male"><fmt:message key="male"/></option>--%>
<%--<option value="female"><fmt:message key="female"/></option>--%>
<%--</select>--%>

<%--<p><fmt:message key="birthdate"/></p>--%>
<%--<input type="date" name="birthdate" class="form-control" placeholder="Birthdate" value="${mentor.birthdate}">--%>

<%--<p><fmt:message key="password"/></p>--%>
<%--<input type="password" name="password" class="form-control" placeholder="Password" value="${mentor.password}">--%>

<%--<p><fmt:message key="info"/></p>--%>
<%--<textarea name="info" class="form-controll" rows="15" cols="10"> ${mentor.info} </textarea>--%>

<%--<p><fmt:message key="rang"/></p>--%>
<%--<input type="text" name="rang" class="form-control" value="${mentor.rang}"/>--%>

<%--<p><fmt:message key="workexp"/></p>--%>
<%--<input type="double" name="experience" class="form-control" value="${mentor.workExperience}"/>--%>

<%--<button class="btn btn-lg btn-block" type="submit"><fmt:message key="update"/></button>--%>
<%--<input type="hidden" name="action" value="mentor-update">--%>
<%--<input type="hidden" name="uuid" value=${mentor.uuid}/>--%>
<%--</form>--%>
<%--<form class="form-signin" action="/maa/do" method="get">--%>
<%--<button class="btn btn-lg btn-block" type="submit"><fmt:message key="return"/></button>--%>
<%--<input type="hidden" name="action" value="admin-cabinet">--%>
<%--</form>--%>
<%--</div>--%>

